<html>
<meta charset="utf-8" />
<title>用户信息</title>
<body>
<div>
    <h1>用户信息</h1>
    <form class="form" action="/api/user/35/info" method="get">
        <div>
            <button type="submit">用户信息</button>
        </div>
        <div class="msg"></div>
    </form>
</div>
<script src="/asset/jquery/jquery-2.2.1.min.js"></script>
<script>
    $('.form').submit(function(){
        var form = $(this);
        console.log(form.find('.msg'));
        var url = $(this).attr('action');
        $.ajax({
            url: url,
            type: 'get',
            data: $(this).serialize(),
            success: function(result) {
                console.log(result);
                form.find('.msg').html(JSON.stringify(result));
            }
        });
        return false;
    });
</script>
</body>
</html>